package com.soulkun.smarthome.ui.splash.register.viewmodel

import androidx.databinding.ObservableBoolean
import androidx.lifecycle.MutableLiveData
import androidx.lifecycle.ViewModel
import com.soulkun.smarthome.logic.repository.ApiRepository

class AppSplashRegisterViewModel: ViewModel() {

    val usernameEditLiveData = MutableLiveData<String>("")
    val passwordEditLiveData = MutableLiveData<String>("")

    var usernameChecked = false
    var passwordVisibility = false

    fun checkUserName(userName: String) = ApiRepository.checkAvailableUserName(userName)
    fun register(userName: String, password: String) = ApiRepository.register(userName, password)

}